#include "spiderTestApp.h"
#include "spiderApp.h"
#include "Moose.h"
#include "AppFactory.h"
#include "MooseSyntax.h"
#include "ModulesApp.h"

template <>
InputParameters
validParams<spiderTestApp>()
{
  InputParameters params = validParams<spiderApp>();
  return params;
}

spiderTestApp::spiderTestApp(InputParameters parameters) : MooseApp(parameters)
{
  spiderTestApp::registerAll(
      _factory, _action_factory, _syntax, getParam<bool>("allow_test_objects"));
}

spiderTestApp::~spiderTestApp() {}

void
spiderTestApp::registerAll(Factory & f, ActionFactory & af, Syntax & s, bool use_test_objs)
{
  spiderApp::registerAll(f, af, s);
  if (use_test_objs)
  {
    Registry::registerObjectsTo(f, {"spiderTestApp"});
    Registry::registerActionsTo(af, {"spiderTestApp"});
  }
}

void
spiderTestApp::registerApps()
{
  registerApp(spiderApp);
  registerApp(spiderTestApp);
}



void
spiderTestApp::associateSyntax(Syntax & /*syntax*/,
                               ActionFactory & /*action_factory*/)
{
  /* Uncomment Syntax and ActionFactory parameters and register your new production objects here! */
}

void
spiderTestApp::associateSyntaxDepends(Syntax & /*syntax*/,
                                      ActionFactory & /*action_factory*/)
{
  /* Uncomment Syntax and ActionFactory parameters and register your new test objects here! */
}

/***************************************************************************************************
 *********************** Dynamic Library Entry Points - DO NOT MODIFY ******************************
 **************************************************************************************************/
// External entry point for dynamic application loading
extern "C" void
spiderTestApp__registerAll(Factory & f,
                           ActionFactory & af,
                           Syntax & s)
{
  spiderTestApp::registerAll(f, af, s);
}

// External entry point for dynamic object registration
extern "C" void
spiderTestApp__registerApps()
{
  spiderTestApp::registerApps();
}
